<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件基础</title>
</head>
<body>
<div id="app">
    <!--组件：传递给组件中的值：props-->
    <qinjiang v-for="item in items" v-bind:qin="item"></qinjiang>

</div>

<!--1.导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>

    // 定义一个Vue组件Component
    Vue.component("qinjiang",{
        props: ['qin'],
        template: '<li>{{qin}}</li>'
    });

    var vm = new Vue({
        el: "#app",
        data:{
            items: ["Java","Linux","前端"]
        }
    });


</script>
</body>
</html>